import axios from 'axios'

axios.defaults.baseURL = process.env.POINT_SHOPPING_URL//api前缀


const instance = axios.create({
  xsrfCookieName: 'xsrf-token'
});

instance.interceptors.request.use(function (config) {
  console.info(config);
  return config;
}, function (error) {
  return Promise.reject(error);
});

instance.interceptors.response.use(function (response) {
  return response.data
}, function (error) {
  return Promise.reject(error);
});
export default instance;
